<template>
	<view class="page">
		<view class="block_1">
			<view class="status_bar">
				<!-- 这里是状态栏 -->
			</view>
			<!-- 头部图片 -->
			<view class="top">
				<span>智慧社区</span>
				<!-- <image src="../../static/imgs/8.jpg" mode=""></image> -->
				<!-- // 头部宫格列表 -->
				<view class="top_list">
					<u-grid :col="4">
						<u-grid-item v-for="item in topList" :key="item.text">
							<view class="bgcolor" :style="{background: item.background}">
								<image :src="item.image" mode=""></image>
							</view>
							<view class="grid-text">{{item.text}}</view>
						</u-grid-item>
					</u-grid>
				</view>
			</view>
			<view class="box">
				<view class="box_1">
					<!-- // 小区公告 -->
					<view class="notice">
						<image
							src="https://lanhu.oss-cn-beijing.aliyuncs.com/psmw1zkahg7wdu2e2mjlta9bxy4p15uxgof4fc38d9-349a-4c85-bd34-259291d13c68">
						</image>
						<view class="text-group_1">
							<text class="text_1">小区公告：</text>
							<text class="text_2">业主朋友们注意啦！</text>
						</view>
					</view>
					<!-- 宫格列表 -->
					<view class="box_list">
						<u-grid :col="4">
							<u-grid-item v-for="item in listData" :key="item.text" @click="jump(item.url)">
								<image :src="item.image" mode=""></image>
								<view class="grid-text">{{item.text}}</view>
							</u-grid-item>
						</u-grid>
					</view>
				</view>
			</view>
			<!-- 防疫日报 -->
			<view class="daily"></view>

			<!-- // 电信互动 -->
			<view class="telecom">
				<view class="telecom_tit">
					<view class="border_box">
						<view class="border_1"></view>
						<view class="border_2 border_left"></view>
					</view>
					<view class="txt">电信互动</view>
					<view class="border_box">
						<view class="border_1"></view>
						<view class="border_2"></view>
					</view>
				</view>
			</view>

			<!-- 福利中心 -->
			<view class="other">
				<image
					src="https://lanhu.oss-cn-beijing.aliyuncs.com/psre4ku0gmretjdd81vgavgpkurkgkfu4890d170b-1f6f-4641-9561-f38a0e10b588"
					mode=""></image>
				<image
					src="https://lanhu.oss-cn-beijing.aliyuncs.com/pswo7ttmaifrmw95rg0vc8nciaox52nla5177bde14-896f-458a-b3bc-666a17861dab"
					mode=""></image>
			</view>
		</view>
		<view style="height: 100rpx;width: 100rpx;background-color: #F9F9F9;"></view>
		<tab-bar></tab-bar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				topList: [{
						image: "https://lanhu.oss-cn-beijing.aliyuncs.com/psvcivz0wgbxqpqqzsg19mig746kxvs3jc2ab4ed7a9-b022-4894-8318-49620b2c4c83",
						text: "一键开门",
						background: "linear-gradient(90deg, #5ABAFC 0%, #5BD2FD 100%)",
					},
					{
						image: "https://lanhu.oss-cn-beijing.aliyuncs.com/psoveu5a81fcwiwap1epjjrouhb2gsr0f9deac0450-55d2-46fd-9b09-5453a8708c49",
						text: "邀请访客",
						background: "linear-gradient(90deg, #4EDDC3 0%, #50EADD 100%",
					},
					{
						image: "https://lanhu.oss-cn-beijing.aliyuncs.com/ps5iryg1abnsteukp7a30zb98f1pt2zjc749aadc9d-8ef8-45f4-80e7-df9c6b22b435",
						text: "物业报修",
						background: "linear-gradient(90deg, #FAB357 0%, #FBD055 100%)",
					},
					{
						image: "https://lanhu.oss-cn-beijing.aliyuncs.com/psa6zn7869l0rbwhgyr0v4xmlho904zx1c6cacc1eb-a27a-4f99-b62b-c538d883c528",
						text: "物业缴费",
						background: "linear-gradient(90deg, #F77359 0%, #F9A759 100%)",
					},
				],
				listData: [{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/78c9f4c59da94886a8fd2ec741895552_mergeImage.png",
						text: "呼叫物业",
						url:"server/server"
					},
					{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/7748cd117c664012b9582d656f31a17f_mergeImage.png",
						text: "智能停车",
						url:"server/server"
					},
					{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/80cb2820cfdb4e47abec2cb8be0106e0_mergeImage.png",
						text: "智慧充电",
						url:"charge/charge"
					},
					{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/4ddfc10698184ae38180e312434c055c_mergeImage.png",
						text: "一键呼梯",
						url:"server/server"
					},
					{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/4ddfc10698184ae38180e312434c055c_mergeImage.png",
						text: "客服管家",
						url:"server/server"
					},
					{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/8b47fb62b1d145a582787516fb9b09a1_mergeImage.png",
						text: "便民服务",
						url:"server/server"
					},
					{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/7c904dcb883e4e86a6b26245f5cd7b7d_mergeImage.png",
						text: "社区活动",
						url:"server/server"
					},
					{
						image: "https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/78c9f4c59da94886a8fd2ec741895552_mergeImage.png",
						text: "更多功能",
						url:"server/server"
					},

				]
			}
		},
		methods: {
			jump(url){
				uni.navigateTo({
					url:url
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.page {
		position: relative;
		width: 100%;
		// height: 1624rpx;
		overflow: hidden;
	}

	.block_1 {
		position: relative;
		width: 100%;
		height: 100%;
		background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/ps6zmn6u3rlmkdjxtjfp81g5bn212o289uf24c3b88-71e6-4823-ba7f-7ac5c521255d) 100% no-repeat;
		background-size: 100% 100%;
	}

	.top {
		position: relative;
		z-index: 1;
		width: 100%;
		height: 432rpx;
		background-color: skyblue;

		// image {
		// 	width: 100%;
		// }
	}

	// 头部宫格列表
	.top_list {
		width: 696rpx;
		height: 180rpx;
		background: #FFFFFF;
		box-shadow: 0px 3px 2px 0px rgba(49, 60, 200, 0.13);
		border-radius: 10px;
		margin: auto;
		position: absolute;
		top: 370rpx;
		left: 26rpx;
		
		.u-grid-item {
			margin-top: 30rpx;
		}
		
		.grid-text {
			font-size: 26rpx;
			font-family: Microsoft YaHei;
			font-weight: bold;
			color: #666666;
			line-height: 60rpx;
		}

		.bgcolor {
			width: 80rpx;
			height: 80rpx;
			border-radius: 36rpx;
			display: flex;
		}

		image {
			margin: auto;
			width: 38rpx;
			height: 46rpx;
		}
	}

	.box {
		width: 100%;
		height: 514rpx;
		position: relative;
	}

	.box_1 {
		position: absolute;
		top: -30rpx;
		width: 100%;
		height: 100%;
		background: #FFFFFF;
		box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.06);
	}

	// 小区公告
	.notice {
		width: 696rpx;
		height: 58rpx;
		box-shadow: 0px 2rpx 4rpx 0px rgba(37, 37, 37, 0.05);
		opacity: 0.8;
		border-radius: 12rpx;
		margin: 184rpx auto 0rpx auto;
		display: flex;
		align-items: center;

		image {
			width: 30rpx;
			height: 26rpx;
			margin: 1rpx 10rpx 0 10rpx;
		}

		.text-group_1 {
			font-family: MicrosoftYaHei-Bold;
		}

		.text_1 {
			color: rgba(134, 134, 134, 1);
			font-size: 20rpx;
			font-weight: bold;
		}

		.text_2 {
			color: rgba(127, 127, 127, 1);
			font-size: 20rpx;
		}
	}

	// 宫格列表
	.box_list {
		.u-grid-item {
			margin-top: 40rpx;
		}

		image {
			width: 46rpx;
			height: 46rpx;
		}

		.grid-text {
			font-size: 20rpx;
			font-family: MicrosoftYaHei-Bold;
			font-weight: bold;
			line-height: 44rpx;
			color: rgba(100, 100, 100, 1);
		}
	}

	// 防疫日报
	.daily {
		width: 696rpx;
		height: 222rpx;
		background: #095AFB;
		border-radius: 14rpx;
		margin: auto;
	}

	// 电信互动
	.telecom {
		margin-top: 40rpx;

		.telecom_tit {
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.txt {
			font-size: 24rpx;
			font-family: Microsoft YaHei;
			font-weight: bold;
			color: #333333;
			line-height: 44rpx;
			margin: 0 20rpx;
		}

		.border_box {
			width: 220rpx;
			height: 2rpx;
			position: relative;
		}

		.border_1 {
			width: 100%;
			height: 100%;
			background-color: #999;
			opacity: 0.2;
		}

		.border_2 {
			width: 104rpx;
			height: 100%;
			background-color: #F56C27;
			position: absolute;
			top: 0;
		}

		.border_left {
			right: 0;
		}
	}

	// 福利中心
	.other {
		margin-top: 10rpx;
		display: flex;
		justify-content: space-around;

		image {
			width: 336rpx;
			height: 232rpx;
		}
	}
</style>
